#pragma once
#include<iostream>
using namespace std;

class File 
{
public:
	virtual void Open() = 0;
	void Close()
	{
		cout << "Closing file" << endl;
	}
	virtual ~File() {};
};
class TextFile :public File
{
	virtual void Open()override
	{
		cout << "Opening text file" << endl;
	}
	void Open(string mode)
	{
		cout << "Opening text file in mode: xxx" << endl;
	}

};
class ImageFile :public File
{
	virtual void Open()override
	{
		cout << "Opening image file" << endl;
	}
};